// ********************************************************************************************
// Este archivo fuente es propiedad de Feria de Remates S.R.L. de C.V. Prohibida su copia o uso
// sin autorización explícita.
// This source file is propietary to Feria de Remates S.R.L. de C.V. May not be used or copied
// without explicit authorization.
// ********************************************************************************************/
package com.feriaderemates.domain.listing;

import java.util.Date;

/**
 *
 * @author Oscar García
 */
public class ListingQuestion {

    private final String question;
    private final String questionerUsername;
    private final long listingId;
    private final Date date;

    private ListingQuestion(String question, String username, long listingId) {
        this.date = null;
        this.questionerUsername = username;
        this.question = question;
        this.listingId = listingId;

    }

    private ListingQuestion(String question, long listingId, Date date, String questionerUsername) {
        this.date = date;
        this.question = question;
        this.listingId = listingId;
        this.questionerUsername = questionerUsername;

    }

    public static ListingQuestion createListingQuestionToInsert(String question, String username, long listingId) {
        return new ListingQuestion(question, username, listingId);
    }

    public static ListingQuestion createListingQuestionToShow(String question, long listingId, 
            Date date, String questionerUsername) {
        return new ListingQuestion(question, listingId, date, questionerUsername);
    }

    /**
     * @return the question
     */
    public String getQuestion() {
        return question;
    }

    /**
     * @return the listingId
     */
    public long getListingId() {
        return listingId;
    }

    /**
     * @return the date
     */
    public Date getDate() {
        return date;
    }

    /**
     * @return the questionerUsername
     */
    public String getQuestionerUsername() {
        return questionerUsername;
    }
}
